package com.coinworld.utils;

import lombok.extern.slf4j.Slf4j;
import org.springframework.core.io.ClassPathResource;
import org.apache.commons.io.IOUtils;

import java.io.InputStream;

/**
 * @description 启动输出
 * @author:
 * @create: 2019-08-07 19:21
 **/
@Slf4j
public class ZbannerPrint {

    private ZbannerPrint() {
        throw new IllegalStateException("Utility class.");
    }

    public static void printLogo() {

        ClassPathResource resource = new ClassPathResource("startup_logo.f");

        try (InputStream inputStream = resource.getInputStream()) {
            IOUtils.readLines(inputStream, "UTF-8").forEach(log::info);
        } catch (Exception e) {
            log.error(e.getMessage());
            log.info("::  app is running. ::");
        }
    }

}
